package com.chenliang.swagger.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @program: myes
 * @description:
 * @author: 陈英俊
 * @create: 2021-09-10 10:34
 */
public class ModelAttr  implements Serializable {
    private static final long serialVersionUID = -4074067438450613643L;


    private String className = "";
    private String name = "";
    private String type = "";
    private String description;
    private String isHaveChildPro;
    private List<ModelAttr> properties = new ArrayList();

    public ModelAttr() {
    }

    public String getClassName() {
        return this.className;
    }

    public String getName() {
        return this.name;
    }

    public String getType() {
        return this.type;
    }

    public String getDescription() {
        return this.description;
    }

    public String getIsHaveChildPro() {
        return this.isHaveChildPro;
    }

    public List<ModelAttr> getProperties() {
        return this.properties;
    }

    public void setClassName(final String className) {
        this.className = className;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setType(final String type) {
        this.type = type;
    }

    public void setDescription(final String description) {
        this.description = description;
    }

    public void setIsHaveChildPro(final String isHaveChildPro) {
        this.isHaveChildPro = isHaveChildPro;
    }

    public void setProperties(final List<ModelAttr> properties) {
        this.properties = properties;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ModelAttr)) {
            return false;
        } else {
            ModelAttr other = (ModelAttr)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$className = this.getClassName();
                Object other$className = other.getClassName();
                if (this$className == null) {
                    if (other$className != null) {
                        return false;
                    }
                } else if (!this$className.equals(other$className)) {
                    return false;
                }

                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$type = this.getType();
                Object other$type = other.getType();
                if (this$type == null) {
                    if (other$type != null) {
                        return false;
                    }
                } else if (!this$type.equals(other$type)) {
                    return false;
                }

                label62: {
                    Object this$description = this.getDescription();
                    Object other$description = other.getDescription();
                    if (this$description == null) {
                        if (other$description == null) {
                            break label62;
                        }
                    } else if (this$description.equals(other$description)) {
                        break label62;
                    }

                    return false;
                }

                label55: {
                    Object this$isHaveChildPro = this.getIsHaveChildPro();
                    Object other$isHaveChildPro = other.getIsHaveChildPro();
                    if (this$isHaveChildPro == null) {
                        if (other$isHaveChildPro == null) {
                            break label55;
                        }
                    } else if (this$isHaveChildPro.equals(other$isHaveChildPro)) {
                        break label55;
                    }

                    return false;
                }

                Object this$properties = this.getProperties();
                Object other$properties = other.getProperties();
                if (this$properties == null) {
                    return other$properties == null;
                } else return this$properties.equals(other$properties);
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof ModelAttr;
    }

//    public int hashCode() {
//        int PRIME = true;
//        int result = 1;
//        Object $className = this.getClassName();
//        int result = result * 59 + ($className == null ? 43 : $className.hashCode());
//        Object $name = this.getName();
//        result = result * 59 + ($name == null ? 43 : $name.hashCode());
//        Object $type = this.getType();
//        result = result * 59 + ($type == null ? 43 : $type.hashCode());
//        Object $description = this.getDescription();
//        result = result * 59 + ($description == null ? 43 : $description.hashCode());
//        Object $isHaveChildPro = this.getIsHaveChildPro();
//        result = result * 59 + ($isHaveChildPro == null ? 43 : $isHaveChildPro.hashCode());
//        Object $properties = this.getProperties();
//        result = result * 59 + ($properties == null ? 43 : $properties.hashCode());
//        return result;
//    }


    @Override
    public int hashCode() {
        return Objects.hash(className, name, type, description, isHaveChildPro, properties);
    }

    public String toString() {
        return "ModelAttr(className=" + this.getClassName() + ", name=" + this.getName() + ", type=" + this.getType() + ", description=" + this.getDescription() + ", isHaveChildPro=" + this.getIsHaveChildPro() + ", properties=" + this.getProperties() + ")";
    }
}
